<template>
	<view class="content">
		<image src="../../static/index/授权登录图@2x.png" mode="widthFix"></image>
		<div class="btn" @click="download">提交表单</div>
	</view>
</template>

<script>
import Api from "../../API/api"
import PathValue from "../../utils/pathValue";
	export default {
		data() {
			return {
        userInfo :{}
      }
		},
		onLoad() {
			//预加载下载页
			uni.preloadPage({
				url: "/pages/index/index"
			})
      //获取code
      let uid = PathValue.getUrlValue( "uid");
      console.log(uid)
      console.log("uid")
      //使用code自动授权
      if (uid) {
            Api.getAgentOne(uid).then(x=>{
              this.userInfo = x.data;
            })
      }
		},
		methods: {
			download() {
				//预加载下载页
				uni.redirectTo({
					url: '/pages/login/login_phone'
				})
			}
		}
	}
</script>

<style lang="less" scoped>
	page {
		background-color: #fff;
	}

	.content {
		display: flex;
		justify-content: center;
		align-items: center;

		image {
			margin-top: 100rpx;
		}

		.btn {
			display: flex;
			justify-content: center;
			align-items: center;
			position: fixed;
			// bottom: 50rpx;
			top: 65%;
			left: 50%;
			transform: translateX(-50%);
			width: 520rpx;
			height: 96rpx;
			background: linear-gradient(180deg, #FFBD57 0%, #FD9509 100%);
			border-radius: 48rpx;
			color: #fff;
		}
	}
</style>